package com.example.bus.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.bus.entity.BusLine;
import com.example.bus.mapper.BusLineMapper;
import com.example.bus.service.BusLineService;
import org.springframework.stereotype.Service;

@Service
public class BusLineServiceImpl extends ServiceImpl<BusLineMapper, BusLine> implements BusLineService {

 
    public BusLine getBusLineByName(String lineName) {
        QueryWrapper<BusLine> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("line_name", lineName); // 假设数据库字段是 line_name
        return this.getOne(queryWrapper);
    }
}
